<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>



<%
	String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
<meta http-equiv="description" content="This is my page" />

<link rel="stylesheet" type="text/css" href="<%=path%>/css/base.css" />
<script type="text/javascript" src="<%=path%>/js/jquery.min.js"></script>
<script type="text/javascript">
	function check() {

		console.log($.trim($("#roomno").val()));
		$("#firstnameLabel").text("")
		if (isNaN($.trim($("#roomno").val()))) { 	
			alert("宿舍号不是数字,不可以修改！");
			//txt_firstname = "";
			return false;
		} else {
			
			if ($("#roomno").val().length == 0) {
				alert("宿舍号不能为空！");
				$("#firstnameLabel").css({
					"color" : "red"
				});
				return false;
			}

			return true;
		}

	}
</script>
</head>

<body leftmargin="2" topmargin="9"
	background='<%=path%>/images/allbg.gif'>
	<form action="<%=path%>/stu!update.action" name="formAdd" method="post"
		onsubmit="return check()">
		<table width="98%" align="center" border="0" cellpadding="4"
			cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom: 8px">
			<tr bgcolor="#EEF4EA">
				<td colspan="3" background="<%=path%>/images/wbg.gif" class='title'>
					<span>调换宿舍</span>
				</td>
			</tr>

			<tr align='center' bgcolor="#FFFFFF"
				onMouseMove="javascript:this.bgColor='red';"
				onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				<td width="25%" bgcolor="#FFFFFF" align="right">区域：</td>
				<td width="75%" bgcolor="#FFFFFF" align="left"><select
					name="data.area">
						<option>A区</option>
						<option>B区</option>
						<option>C区</option>
						<option>D区</option>
				</select></td>
				<%-- <td width="75%" bgcolor="#FFFFFF" align="left">
						<input name="data.area" value="${record.area }"/>
					</td> --%>
			</tr>
			<tr align='center' bgcolor="#FFFFFF"
				onMouseMove="javascript:this.bgColor='red';"
				onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				<td width="25%" bgcolor="#FFFFFF" align="right">楼栋：</td>
				<td width="75%" bgcolor="#FFFFFF" align="left"><select
					name="data.flat">
						<option>1</option>
						<option>2</option>
						<option>3</option>
						<option>4</option>
						<option>5</option>
						<option>6</option>
						<option>7</option>
						<option>8</option>
				</select> 栋</td>
				<%-- <td width="75%" bgcolor="#FFFFFF" align="left">
						<input name="data.flat" value="${record.flat}"/>
					</td> --%>
			</tr>
			<tr align='center' bgcolor="#FFFFFF"
				onMouseMove="javascript:this.bgColor='red';"
				onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				<td width="25%" bgcolor="#FFFFFF" align="right">宿舍号：</td>
				<td width="75%" bgcolor="#FFFFFF" align="left"><input
					name="data.roomno" id="roomno" value="${record.roomno }" /> <input
					name="data.id" value="${record.id}" type="hidden" /></td>
			</tr>

			<tr align='center' bgcolor="#FFFFFF"
				onMouseMove="javascript:this.bgColor='red';"
				onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
				<td width="25%" bgcolor="#FFFFFF" align="right">&nbsp;</td>
				<td width="75%" bgcolor="#FFFFFF" align="left"><input
					type="submit" value="提交" /> &nbsp; <input type="reset" value="重置" />
					&nbsp;</td>
			</tr>
		</table>
	</form>
</body>
</html>
